<template>
  <elm-page-tb>
    <template #top>
      <el-input placeholder="请查询输入内容" prefix-icon='el-icon-search' size="mini" style="width: 250px;" v-model="postData.name" clearable></el-input>
      <right>
        <el-button-group>
          <el-button icon="el-icon-search" size="mini" @click="v_getData()">查询</el-button>
          <elm-open-button url="flow_edit" :full="false" width="1000" height="90%" theme="white" title="新增"
                           :data="{'edit_type':'create'}" icon="el-icon-edit" size="mini">新增</elm-open-button>
        </el-button-group>
      </right>
    </template>
    <elm-table url="/system/flow/flow/GetFlowListPage_OnCanvas" :post-data="postData" :default-expand-all="true" height="100%">
      <el-table-column prop="title" label="名称" min-width="100px" header-align="center" :sortable='true'></el-table-column>
      <el-table-column prop="code" label="编码" width="160px" header-align="center" :sortable='true'></el-table-column>
      <!--<el-table-column prop="remark" label="备注" width="160px" header-align="center"></el-table-column>-->
      <!--<el-table-column prop="order_number" label="顺序" width="160px" align="center"></el-table-column>-->
      <el-table-column fixed="right" label="操作" width="160px" align="center">
        <template v-slot="scope">
          <elm-open-button url="flow_edit" :full="false" width="1000" height="90%" theme="white" title="编辑" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
          <elm-delete-button v-if="scope.row.type!='系统'" type="text" size="mini" url="/system/flow/one_road_flow/DeleteFlow" :data="{ id: scope.row.id }">删除</elm-delete-button>
        </template>
      </el-table-column>
    </elm-table>
  </elm-page-tb>
</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: { name: null },
    }
  },
  created() {
  },
  methods: {
    async v_getData(){
      this.tablebinding();
    }
  }
}
</script>

<style scoped>
</style>